<div class="header">

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{{url_to_the_site_root}}">TimeOff.Management</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-left">
        {{# if logged_user }}
          <li><a href="/calendar/">Calendar</a></li>
          {{# unless keep_team_view_hidden }}
            <li><a href="/calendar/teamview/">Team View</a></li>
          {{/ unless }}
          {{# if logged_user.admin }}
            <li class="hidden-xs"><a href="/users/">Employees</a></li>
          {{/if}}
          <li class="navbar-form navbar-left">
            <div class="form-group">
              <button type="button" class="btn btn-info" data-toggle="modal" data-target="#book_leave_modal" id="book_time_off_btn">New absence</button>
            </div>
          </li>
        {{/if}}
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
          {{#if logged_user }}
            <li class="dropdown" id="header-notification-dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                <span class="fa fa-bell-o"></span>
                <span class="label label-info notification-badge hidden"></span>
              </a>
              <ul class="dropdown-menu" role="menu">
                <li class="dropdown-header">No notifications</li>
              </ul>
            </li>
            {{#if logged_user.admin }}
            <li class="dropdown hidden-xs">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="fa fa-gears"></span> <span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="/settings/general/">General</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="/settings/departments/">Departments</a></li>
                <li><a href="/settings/bankholidays/">Bank Holidays</a></li>
                <li><a href="/settings/company/authentication/">LDAP configuration</a></li>
                <li><a href="/settings/company/integration-api/">API configuration</a></li>
                <li><a href="/users/import/">Import employees</a></li>
                <li role="separator" class="divider"></li>
                <li><a href="/audit/email/">Emails audit</a></li>
                <li><a href="/reports/">Reports</a></li>
              </ul>
            </li>
            {{/if}}
            <li class="visible-xs-block"><a href="/requests/">Requests</a></li>
            <li class="visible-xs-block"><a href="/logout/">Logout</a></li>
            <li class="dropdown hidden-xs">
              <a id="me_menu" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Me <span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="/requests/">Requests</a></li>
                <li class="hidden-xs"><a href="/calendar/feeds/">Feeds</a></li>
                <li role="separator" class="divider hidden-xs"></li>
                <li><a href="/logout/">Logout</a></li>
              </ul>
            </li>
          {{else}}
            <li><a href="/login/">Login</a></li>
          {{/if}}
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

{{# if logged_user }}
  {{# if logged_user.company.company_wide_message  }}
    <div class="alert alert-danger" role="alert">{{ logged_user.company.company_wide_message }}</div>
  {{/if}}
{{/if}}

</div>


